package com.gotop.mapper.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gotop.entity.system.Role;
import com.gotop.vo.system.RoleVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Mapper 接口
 *
 * @author superfish
 */
@Mapper
@Repository
public interface RoleDao extends BaseMapper<Role> {

    /**
     * 自定义分页
     *
     * @param page
     * @param role
     * @return
     */
    List<RoleVO> selectRolePage(IPage page, RoleVO role);

    /**
     * 获取树形节点
     *
     * @param tenantId
     * @param excludeRole
     * @return
     */
    List<RoleVO> tree(String tenantId, String excludeRole);

    /**
     * 获取角色名
     *
     * @param ids
     * @return
     */
    List<String> getRoleNames(List<Long> ids);

}
